  <form action="<?php echo $PHP_SELF; ?>" method="POST">

	<h3>Event</h3>
    <input type="hidden" name="id" value="<?php echo $c->event->id; ?>"/>
    <table id="data">
    	<tr><th>Title:</th><td><input type="text" name="title" value="<?php echo $c->event->title; ?>" /></td></tr>
    	<tr><th>Type:</th><td><?php echo dropdown("event_type", $c->event->event_type); ?><br/></td></tr>
    	<tr><th>Status:</th><td><?php echo dropdown("event_status", $c->event->event_status); ?><br/></td></tr>
    	<tr><th>Contact:</th><td><div id="contactDiv"><?php echo tableDropdown("contact_id", $c->event->contact_id, $c->contacts, "lastname, firstname"); ?>
    		<small><?php echo HtmlUtil::internalAsynchLink("[new]", "contact", $userRoles); ?></small></div>
    	</td></tr>
    	<tr><th>Location:</th><td><div id="locationDiv"><?php echo tableDropdown("location_id", $c->event->location_id, $c->locations, "name"); ?>
    		<small><?php echo HtmlUtil::internalAsynchLink("[new]", "location", $userRoles); ?></small></div>
    	</td></tr>
    	<tr><th>Start/End:</th><td><input type="text" name="startDate" value="<?php echo HtmlUtil::dateFormat("Y-m-d", $c->event->start); ?>" onclick="displayDatePicker('startDate')" size="11" />
    		<input type="text" name="startTime" value="<?php echo HtmlUtil::dateFormat("g:i a", $c->event->start); ?>" size="7" /> -
    		<input type="text" name="endTime" value="<?php echo HtmlUtil::dateFormat("g:i a", $c->event->end); ?>" size="7" /></td></tr>
    	<tr><th>Note:</th><td><textarea name="note" cols="60" rows="5"><?php echo $c->event->note; ?></textarea></td></tr>
    	<tr><th>Public:</th><td><input type="checkbox" name="is_public" value="T" <?php if ($c->event->public == "T") echo "checked"; ?>/></td></tr>
    	<tr><th>&nbsp;</th><td><?php if ($c->event->id > 0) echo HtmlUtil::internalLink("[edit setlist]", "setlist", $userRoles, array("action" => "load", "id" => $c->event->id));?></td></tr>
    	<tr><td>&nbsp;</td><td><input type="submit" name="action" value="Save" /><input type="submit" name="action" value="Cancel" /></td></tr>
    </table>
  </form>